pp108 : propertyValues Property

propertyValues Property


Object that denotes the XML data of the actual object for which the Properties are displayed in the property sheet.

Syntax

Scripting

propertysheetID.propertyValues [ =oData ]


Parameters

Parameter

Description

oData

Object that denotes the actual data that is to be displayed in the property sheet.


Remarks


The following sample denotes how the actual object for which the properties are to be displayed would look like:

XML

<script type="cordys/xml" id="actualContent">
    <formula> 
       <description>Date, time functions in SQL server<description> 
       <type>DateTime Functions</type>
    </formula>
</script>



Following is the schema declared for the above XML data:

XML

<script type="cordys/xml" id="propertySchema">
    <formula annotation="A collection of one or more expressions.> 
       <description type="string" path="description" annotation="The description of the formula."/> 
       <type type="string" path="type" annotation="The actual name of the formula"/> 
    </formula>
</script>



Once schema is defined, the following JScript code is written to display the XML content in the property sheet:

Scripting

//'propSheet' denotes the ID of the propertysheet component. This function is called on the onselect //Event of a tree node where the actual data is displayed
function showProperties() 
{ 
     //Get the actual data
     var actualData = event.activeElement.gettreeItem().data; 
 
    //Set the schema for the propertysheet 
    propSheet.properties = propertySchema; 
 
    //Set the actual value to be displayed 
    propSheet.propertyValues = actualData; 
 
   //Call open method to display the properties 
   propSheet.open(propSheet); 
}



Following is the definition of the propertysheet component. Since open method is called, inline property is set to false:

HTML

<div cordysType =  "wcp.library.util.PropertySheetLibrary"  id="propSheet" inline="false"...>
...
</div> 


See Also


propertysheet